<template>
  <view class="container">
    <!-- 搜索头 -->
    <view class="search-header">
      <text class="search-keyword">"{{ keyword }}"</text>
      <text class="result-count">共{{ searchResults.length }}条结果</text>
    </view>

    <!-- 复用资讯列表结构 -->
    <scroll-view class="list-scroll" scroll-y>
      <view 
        v-for="(item, index) in searchResults" 
        :key="index"
        class="info-card"
      >
        <image class="info-image" :src="item.image" mode="aspectFill" />
        <view class="info-content">
          <text class="info-title">{{ item.title }}</text>
          <text class="info-desc">{{ item.content }}</text>
          <text class="info-date">{{ item.date }}</text>
        </view>
      </view>
    </scroll-view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      keyword: '',
      searchResults: []
    }
  },
  onLoad(options) {
    this.keyword = decodeURIComponent(options.keyword || '')
    this.loadResults()
  },
  methods: {
    loadResults() {
      // 模拟搜索结果（实际应调用接口）
      this.searchResults = [
        {
          title: `${this.keyword}政策解读`,
          content: `关于${this.keyword}的最新政策说明...`,
          date: '2024-03-15',
          image: '/static/info/1.jpg'
        },
        {
          title: `${this.keyword}技术研讨会`,
          content: `即将召开${this.keyword}专题技术会议...`,
          date: '2024-03-14',
          image: '/static/info/2.jpg'
        }
      ]
    }
  }
}
</script>

<style>
.container {
  padding: 15px;
  background: #f5f5f5;
  height: 100vh;
}

.search-header {
  padding: 15px 0;
  margin-bottom: 15px;
}

.search-keyword {
  font-size: 18px;
  color: #333;
  font-weight: 500;
}

.result-count {
  font-size: 12px;
  color: #999;
  margin-left: 10px;
}

/* 复用原有资讯卡片样式 */
.info-card {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
}
.info-image {
  width: 30%;
  height: 100px;
  border-radius: 6px;
  margin-right: 10px;
}
/* ...（其他样式与资讯页保持一致）... */
</style>